package com.foreveross.proxyip.application.impl.offer;

import java.util.List;

import javax.annotation.Resource;
import javax.jws.WebService;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import com.foreveross.proxyip.application.offer.IProxyIPService;
import com.foreveross.proxyip.application.offer.bean.ProxyIpDTO;
/**
 * 代理IP服务提供的webservice服务
 * @author xiangsf 2013-05-31
 *
 */
@Service
@WebService(serviceName="ProxyIPWebService",endpointInterface = "com.foreveross.proxyip.application.offer.IProxyIPService")
public class ProxyIPWebServiceImpl  implements IProxyIPService {
	
	protected static Logger logger = Logger.getLogger(ProxyIPWebServiceImpl.class);
	@Resource(name="proxyIPEjbService")  IProxyIPService proxyIPService;
	
	@Override
	
	public ProxyIpDTO getProxyIp(String auth, String clientIp) throws Exception {
		return proxyIPService.getProxyIp(auth, clientIp);
	}

	@Override
	
	public List<ProxyIpDTO> getProxyIps(int size, String auth, String clientIp) throws Exception {
		return proxyIPService.getProxyIps(size, auth, clientIp);
	}

	@Override
	
	public ProxyIpDTO getChannelProxyIp(String channel, String auth, String clientIp) throws Exception {
		return proxyIPService.getChannelProxyIp(channel, auth, clientIp);
	}

	@Override
	
	public List<ProxyIpDTO> getChannelProxyIps(String channel, int size,
			String auth, String clientIp) throws Exception {
		return proxyIPService.getChannelProxyIps(channel, size, auth, clientIp);
	}

	@Override
	
	public boolean recycle(ProxyIpDTO proxyIp, String auth) throws Exception {
		return proxyIPService.recycle(proxyIp, auth);
	}
	


//	@Override
//	
//	public ProxyIpDTO getProxyIp(String auth) throws Exception {
//		return this.getProxyIp(auth, null);
//	}

//	@Override
//	
//	public List<ProxyIpDTO> getProxyIps(int size, String auth) throws Exception {
//		return this.getProxyIps(size, auth, null);
//	}
//
//	@Override
//	
//	public ProxyIpDTO getChannelProxyIp(String channel, String auth)
//			throws Exception {
//		return this.getChannelProxyIp(channel, auth,null);
//	}
//
//	@Override
//	
//	public List<ProxyIpDTO> getChannelProxyIps(String channel, int size,
//			String auth) throws Exception {
//		return this.getChannelProxyIps(channel, size, auth, null);
//	}

}
